# MSVC:
$pathContent = [Environment]::GetEnvironmentVariable('path', 'Machine')
$binPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86"

if ($pathContent -split ';'  -notcontains  $binPath) {
  $env:path += ";$binPath"
}

$incContent = [Environment]::GetEnvironmentVariable('include', 'Machine')
$incPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include"
if ($incContent -split ';'  -notcontains  $incPath) {
  if ($env:include) {
    $env:include += ";$incPath"
  } else {
    $env:include += "$incPath"
  }
  
}

$libContent = [Environment]::GetEnvironmentVariable('lib', 'Machine')
$libPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x86"
if ($libContent -split ';'  -notcontains  $libPath) {
  if ($env:lib) {
    $env:lib += ";$libPath"
  } else {
    $env:lib += "$libPath"
  }
}


# Windows SDK
$incContent = [Environment]::GetEnvironmentVariable('include', 'Machine')
$incPath = "C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared"
$incPath+= ";C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um"
$incPath+= ";C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt"
if ($incContent -split ';'  -notcontains  $incPath) {
  if ($env:include) {
    $env:include += ";$incPath"
  } else {
    $env:include += "$incPath"
  }
}

$libContent = [Environment]::GetEnvironmentVariable('lib', 'Machine')
$libPath = "C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86"
$libPath+= ";C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x86"
if ($libContent -split ';'  -notcontains  $libPath) {
  if ($env:lib) {
    $env:lib += ";$libPath"
  } else {
    $env:lib += "$libPath"
  }
}


# VCPKG:
$pathContent = [Environment]::GetEnvironmentVariable('path', 'Machine')
$binPath = "D:\opt\vcpkg\installed\x86-windows\bin"
if ($pathContent -split ';'  -notcontains  $binPath) {
  $env:path += ";$binPath"
}

$incContent = [Environment]::GetEnvironmentVariable('include', 'Machine')
$incPath = "D:\opt\vcpkg\installed\x86-windows\include"
$incPath+= ";D:\opt\vcpkg\installed\x86-windows\include\python3.11"
if ($incContent -split ';'  -notcontains  $incPath) {
  if ($env:include) {
    $env:include += ";$incPath"
  } else {
    $env:include += "$incPath"
  }
}

$libContent = [Environment]::GetEnvironmentVariable('lib', 'Machine')
$libPath = "D:\opt\vcpkg\installed\x86-windows\lib"
if ($libContent -split ';'  -notcontains  $libPath) {
  if ($env:lib) {
    $env:lib += ";$libPath"
  } else {
    $env:lib += "$libPath"
  }
}


# GeoProbe:
$pathContent = [Environment]::GetEnvironmentVariable('path', 'Machine')
$binPath = "D:\opt\AGRS GeoProbe\GeoProbe\bin"
if ($pathContent -split ';'  -notcontains  $binPath) {
  $env:path += ";$binPath"
}
$incContent = [Environment]::GetEnvironmentVariable('include', 'Machine')
$incPath = "D:\opt\AGRS GeoProbe\DevelopKit\GP_Developer\Include"
$incPath+= ";C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\include"
if ($incContent -split ';'  -notcontains  $incPath) {
  if ($env:include) {
    $env:include += ";$incPath"
  } else {
    $env:include += "$incPath"
  }
}
$libContent = [Environment]::GetEnvironmentVariable('lib', 'Machine')
$libPath = "D:\opt\AGRS GeoProbe\DevelopKit\GP_Developer\Lib"
$libPath+= ";C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\lib\x86"
if ($libContent -split ';'  -notcontains  $libPath) {
  if ($env:lib) {
    $env:lib += ";$libPath"
  } else {
    $env:lib += "$libPath"
  }
}
